package fr.paris.lutece.plugins.techos.bean.chat;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import fr.paris.lutece.plugins.genericjpa.bean.GenericJPABean;


/**
 * The Chat Bean
 * @author jchaline
 */
@Entity
@Table( name = "techos_chat" )
public class Chat extends GenericJPABean<Integer>
{

    private static final long serialVersionUID = 8587506574891952609L;

    /** Sequence name. */
    private static final String JPA_SEQUENCE_NAME = "techos_chat_sequence";

    /**
     * The plugin name
     */
    protected static final String PLUGIN_NAME = "techos";

    /**
     * Name of the sequence table for the plugin techos
     */
    protected static final String SEQUENCE_TABLE_NAME = PLUGIN_NAME + "_sequences";

    /** Unique value. */
    private static final String JPA_COLUMN_NAME = "techos_chat_id";

    @TableGenerator( table = SEQUENCE_TABLE_NAME, name = JPA_SEQUENCE_NAME, pkColumnValue = JPA_COLUMN_NAME, allocationSize = 1 )
    @GeneratedValue( strategy = GenerationType.TABLE, generator = JPA_SEQUENCE_NAME )
    @Id
    @Column( name = "id" )
    private Integer _id;

    @Column( name = "date" )
    private Date _date;

    @Column( name = "name" )
    private String _name;

    /**
     * the date setter
     * @param date the date to set
     */
    public void setDate( Date date )
    {
        this._date = date;
    }

    /**
     * the date getter
     * @return date
     */
    public Date getDate( )
    {
        return this._date;
    }

    /**
     * the id setter
     * @param id the id to set
     */
    public void setId( Integer id )
    {
        this._id = id;
    }

    /**
     * the id getter
     * @return id
     */
    public Integer getId( )
    {
        return this._id;
    }

    /**
     * the name setter
     * @param name the name to set
     */
    public void setName( String name )
    {
        this._name = name;
    }

    /**
     * the name getter
     * @return name
     */
    public String getName( )
    {
        return this._name;
    }

}